﻿using LxBasic;
using System;

namespace LxCore
{
    public class TransDataBase : IInitializable
    {
        public bool IsSecondOrder
        {
            get
            {
                TimeDiscreteTypes t = LxSim.Sim.Physics.TimeDiscreteType;
                return t == TimeDiscreteTypes.Implicit_2nd || t == TimeDiscreteTypes.Explicit_2nd;
            }
        }
        public virtual bool IsInitialized => throw new NotImplementedException();


        public double GetFactor_1stOrder()
        {
            return LxSim.Sim.Steps.TimeStep.Factor1st_Phi;
        }
        public (double f, double fo, double foo) GetFactor_2ndOrder()
        {
            var step = LxSim.Sim.Steps.TimeStep;
            return (step.Factor2nd_Phi, step.Factor2nd_PhiO, step.Factor2nd_PhiOO);
        }
        public virtual void Initialize() { }
        public virtual void FormAb_ImplicitTrans(ThreadInfo threadInfo)
        {
            throw new NotImplementedException();
        }
        public virtual void FormAb_ExplicitTrans(ThreadInfo threadInfo)
        {
            throw new NotImplementedException();
        }
        public virtual void SaveOldValue()
        {

        }
        public enum TransientDataStates : byte
        {
            None, Only_o, Both_o_oo
        }
    }
}
